package com.ruoyi.baoming.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.baoming.mapper.EthnicityMapper;
import com.ruoyi.baoming.domain.Ethnicity;
import com.ruoyi.baoming.service.IEthnicityService;

/**
 * 民族信息Service业务层处理
 * 
 * @author xiaosong
 * @date 2024-11-20
 */
@Service
public class EthnicityServiceImpl implements IEthnicityService 
{
    @Autowired
    private EthnicityMapper ethnicityMapper;

    /**
     * 查询民族信息
     * 
     * @param id 民族信息主键
     * @return 民族信息
     */
    @Override
    public Ethnicity selectEthnicityById(Long id)
    {
        return ethnicityMapper.selectEthnicityById(id);
    }

    /**
     * 查询民族信息列表
     * 
     * @param ethnicity 民族信息
     * @return 民族信息
     */
    @Override
    public List<Ethnicity> selectEthnicityList(Ethnicity ethnicity)
    {
        return ethnicityMapper.selectEthnicityList(ethnicity);
    }

    /**
     * 新增民族信息
     * 
     * @param ethnicity 民族信息
     * @return 结果
     */
    @Override
    public int insertEthnicity(Ethnicity ethnicity)
    {
        return ethnicityMapper.insertEthnicity(ethnicity);
    }

    /**
     * 修改民族信息
     * 
     * @param ethnicity 民族信息
     * @return 结果
     */
    @Override
    public int updateEthnicity(Ethnicity ethnicity)
    {
        return ethnicityMapper.updateEthnicity(ethnicity);
    }

    /**
     * 批量删除民族信息
     * 
     * @param ids 需要删除的民族信息主键
     * @return 结果
     */
    @Override
    public int deleteEthnicityByIds(Long[] ids)
    {
        return ethnicityMapper.deleteEthnicityByIds(ids);
    }

    /**
     * 删除民族信息信息
     * 
     * @param id 民族信息主键
     * @return 结果
     */
    @Override
    public int deleteEthnicityById(Long id)
    {
        return ethnicityMapper.deleteEthnicityById(id);
    }
}
